package com.mf.entity.req;

import java.io.Serial;

import com.mf.groups.GroupsUpdateInterface;
import com.mf.groups.GroupsAddInterface;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalDate;

import lombok.Data;

/**
 * 粉碎明细提交
 *
 * @date 2025-04-21 09:19:55
 */
@Data
public class ReqSmashDetail implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "id不能为空", groups = {GroupsUpdateInterface.class})
    @Null(message = "新增id必须为空", groups = {GroupsAddInterface.class})
    private Integer id;
    @Schema(description = "粉碎工单id")
    @NotNull(message = "粉碎工单id不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private Integer samshId;
    @Schema(description = "来源id")
    private Integer sourceId;
    @NotNull(message = "EnumWorkType不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    @Schema(description = "EnumWorkType")
    private Integer sourceType;
    @Schema(description = "物料id")
    @NotNull(message = "物料id不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private Integer materailId;
    @Schema(description = "物料重量")
    @NotNull(message = "物料重量不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private Double materailWeight;
    @Schema(description = "物料名称")
    @NotBlank(message = "物料名称不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private String materailName;
}
